home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / misc / football / user / deletenewdatafiles.rexx < prev    next >
OS/2 REXX Batch file  |  1999-11-29  |  1KB  |  41 lines

  1. /* Mode=Run */
  2. /* ***********************************************************************
  3.  
  4.    DELETE NEW DATA FILES PROGRAM FOR FOOTBALL REXX SUITE
  5.   -------------------------------------------------------
  6.                    Copyright  Mark Naughton 1997
  7.  
  8.  
  9. Version    Date     History
  10. --------------------------------------------------------------------------
  11.  
  12.  1.0       061097   Created to cleanup files left over from EndOfSeason.
  13.            200999   Added support for subdirectories in Data/.
  14.  
  15. **************************************************************************
  16.  
  17. Procedure
  18. ---------
  19.  
  20. 1. Call 'Delete' command to delete all files in 'Data/' with '_NewData'.
  21.  
  22. ************************************************************************** */
  23. parse arg league_file
  24.  
  25. version      = 1
  26. addlib('rexxsupport.library',0,-30,0)
  27.  
  28. filelist = showdir("Data/",'D')
  29.  
  30. if filelist ~= "" then do
  31.    do i=1 to words(filelist)
  32.       name = word(filelist,i)
  33.       address command 'c:Delete >NIL: Data/'strip(name)'/#?_NewData#?'
  34.    end
  35. end
  36. else do
  37.    address command 'c:Delete >NIL: Data/#?_NewData#?'
  38. end
  39. exit
  40.  
  41.